import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/home.vue'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      meta: {
        show_nav: true
      }
    },
    {
      path: '/record',
      name: 'record',
      component: () => import('../views/record.vue'),
      meta: {
        show_nav: true
      }
    },
    {
      path: '/dictation/:id',
      name: 'dictation',
      component: () => import('../views/dictation.vue'),
      meta: {
        show_nav: false
      }
    },
    {
      path: '/edit/:id',
      name: 'edit',
      component: () => import('../views/edit.vue'),
      meta: {
        show_nav: false
      }
    },
    {
      path: '/hist/:id',
      name: 'hist',
      component: () => import('../views/hist.vue'),
      meta: {
        show_nav: false
      }
    },
  ],
})

export default router
